package com.partner.share.work.web.admin.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.partner.share.work.mybatis.plus.bean.IDEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * @author pengyangyan
 * @version 1.0.0
 * @date 2019年10月08日 15:15:00
 */
@EqualsAndHashCode(callSuper = false)
@Entity
@Data
@TableName("sys_menu")
@Table(name = "sys_menu")
public class Menu{
    @Id
    @TableId(type = IdType.AUTO)
    private Integer id;

    @Column(name = "create_time",insertable = false,updatable = false)
    @TableField(insertStrategy = FieldStrategy.NOT_EMPTY,fill = FieldFill.INSERT)
    private Date createTime;

    @Column(name = "update_time",insertable = false,updatable = false)
    @TableField(updateStrategy = FieldStrategy.NOT_EMPTY,fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @Column(nullable = false,columnDefinition = "varchar(100) COMMENT '菜单名称'")
    private String menuTitle;

    @Column(nullable = false,columnDefinition = "varchar(200) COMMENT '菜单地址'")
    private String menuUrl;

    @Column(nullable = false,columnDefinition = "varchar(200) COMMENT '菜单图标'")
    private String menuIcon;

    @Column(nullable = false,columnDefinition = "int default '0' COMMENT '父ID'")
    private Integer parentId;
}
